package Day14;

import java.util.Objects;

public class Express {
    private int number;
    private String company;
    private int code;
    private int gui;//柜子编号


    public Express() {
    }

    public Express(int number, String company,int code,int gui) {
        this.number = number;
        this.company = company;
        this.code = code;
        this.gui = gui;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public void setCode(int code){
        this.code = code;
    }
    public int getCode(){
        return code;
    }
    public int getGui(){
        return gui;
    }
    public void setGui(int gui){
        this.gui = gui;
    }

    @Override
    public String toString() {
        return "Express{" +
                "number=" + number +
                ", company='" + company + '\'' +
                ", code=" + code +
                ", gui=" + gui +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Express express = (Express) o;
        return number == express.number &&
                code == express.code &&
                gui == express.gui &&
                Objects.equals(company, express.company);
    }

    @Override
    public int hashCode() {
        return Objects.hash(number, company, code, gui);
    }
}
